package org.tobaccomain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.tobaccomain.pojo.entity.YearData;

import java.time.Year;

@Mapper
public interface YearMapper extends BaseMapper<YearData> {
    @Update("update year set  number = number + #{number} where year = #{year}")
    void updateNumber(YearData yearData);

    @Select("select number from year where year = #{year}")
    Integer selectNumber(Year year);

    @Delete("delete  from year where year = #{year}")
    void deleteYear(Year year);
}
